/*
 *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions are met:
 *
 *  Redistributions of source code must retain the above copyright notice,
 *  this list of conditions and the following disclaimer.
 *  Redistributions in binary form must reproduce the above copyright
 *  notice, this list of conditions and the following disclaimer in the
 *  documentation and/or other materials provided with the distribution.
 *  Neither the name of the dreamlu.net developer nor the names of its
 *  contributors may be used to endorse or promote products derived from
 *  this software without specific prior written permission.
 *  Author: Chill 庄骞 (smallchill@163.com)
 */
package com.plian.system.service.pf;

import com.plian.system.entity.pf.BaseChildGrantSalary;
import com.plian.system.model.ObjResult;
import com.plian.system.model.R;
import com.plian.system.mybatis.base.BaseService;
import com.plian.system.vo.pf.BaseChildGrantSalaryVO;
import com.plian.system.vo.pf.SalaryMonthStatisticsVO;

import java.util.List;

/**
 * 职工工资发放主表_子企业 服务类
 *
 * @author
 * @since 2019-09-27
 */
public interface IBaseChildGrantSalaryService extends BaseService<BaseChildGrantSalary> {

    /**
     * 每月只能填写一次
     * @param baseChildGrantSalary
     * @return
     */
    String checkMonth(BaseChildGrantSalary baseChildGrantSalary);


    /**
     * 保存 包含子表
     * @param baseChildGrantSalary
     * @return
     */
    boolean submit(BaseChildGrantSalary baseChildGrantSalary);

    /**
     * 获取detail obj对象
     * @param baseChildGrantSalaryVO
     * @return
     */
    R<BaseChildGrantSalaryVO> getDetailObj(BaseChildGrantSalaryVO baseChildGrantSalaryVO);


    /**
     * 子企业按年统计
     * @param fillingYear
     * @param fillingUnitIds
     * @return
     */
    List<SalaryMonthStatisticsVO> yearStatistics(String fillingYear, List<String> fillingUnitIds);

    /**
     * 子企业职工工资发放填报树 新增
     * @param baseChildGrantSalary
     * @return
     */
    ObjResult addTree(BaseChildGrantSalary baseChildGrantSalary);

    /**
     * 子企业职工工资发放填报树 判断当前登录账号是否有新增权限
     * @return
     */
    ObjResult isHavePre();
}
